-module(myfun).
-export([temp/0, test/1, data/0,  fruitData/0, makeFF/0, testFF/1]).

temp() -> 
	fun({c,X}) -> {c, 3*X};
	   	({d,X}) -> {c, 4*X}
	end.

test(T) -> 
	F = temp(),
	F(T).

data() ->  [1, 2, 3, 4].


testFF(Name) ->
	Fruit = fruitData(),
	FF = makeFF(),
	F = FF(Fruit),
	F(Name),
	lists:filter(F, [apple, lagn, adf]).
fruitData() -> [apple, pear, orange].

makeFF() ->
	fun(L) -> (fun(X) -> lists:member(X, L) end ) end.
	


